<!DOCTYPE html>
<html>
<body contenteditable="true">
<span>XX</span>
<table style="background: red;">
    <tr><td><span>AA</span></td></tr>
</table>
YY
<script>
if (window.testRunner)
    testRunner.dumpAsText();

var range = document.createRange();
var selection = window.getSelection();
var elementList = document.getElementsByTagName('span');
range.setStart(elementList[0], 0);
range.setEnd(elementList[1], 1);
selection.addRange(range);
document.execCommand('InsertUnorderedList');
document.body.textContent = 'PASS if Blink reaches here.';
</script>
</body>
</html>
